home *** CD-ROM | disk | FTP | other *** search
- Subject: v07i019: Elm Update Kit, Part02/03
- Newsgroups: mod.sources
- Approved: mirror!rs
-
- Submitted by: Dave Taylor <taylor@hplabs.HP.COM>
- Mod.sources: Volume 7, Issue 19
- Archive-name: elm_update/Part02
-
- [ The shell scripts in this posting should be run on a clean copy of
- the ELM sources. Then run the "Configure.sh" script now provided,
- to build the Makefiles, etc. I suppose this is a good time to say
- that Dave said to ignore errors in unpacking Part 12 of the Volume
- 6 ELM distribution. -- r$ ]
-
- #!/bin/sh
- # This is a shell archive. Remove anything before this line,
- # then unpack it by saving it in a file and typing "sh file".
- # Wrapped by mirror!rs on Wed Sep 3 10:19:36 EDT 1986
-
- # Exit status; set to 1 on "wc" errors or if would overwrite.
- STATUS=0
- # Contents: Edit2
-
- echo x - Edit2
- if test -f Edit2 ; then
- echo Edit2 exists, putting output in $$Edit2
- OUT=$$Edit2
- STATUS=1
- else
- OUT=Edit2
- fi
- sed 's/^XX//' > $OUT <<'@//E*O*F Edit2//'
- XX: Use /bin/sh
-
- XX# This is the automatically generated output of the AUTODIFF program after
- XX# being run on the two directories;
- XX# Old Directory: Elm-Posted
- XX# New Directory: Elm
-
- XX# Any problems with execution of this script should be reported to the
- XX# author of the program, Dave Taylor, at "hplabs!taylor". Thanks
-
- XX# first off, let's make sure we're running in SH
-
- XXexport PATH || (sh $0; exit $$)
-
- XX# next, let's ensure the user has "ed"...
-
- XXif [ ! -f /bin/ed ]
- XXthen
- XX echo I can\'t find /bin/ed\!
- XX exit 1
- XXfi
-
- XX# finally, let's get this show on the road!!
-
- XX#---------------------------------
- XX# File Elm/src/Makefile.mstr is new!
-
- XXecho File Elm/src/Makefile.mstr is new - extracting...
- XXif [ -f src/Makefile.mstr ]
- XXthen
- XX echo File \'src/Makefile.mstr\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'src/Makefile.mstr.old\'...
- XX /bin/mv -f src/Makefile.mstr src/Makefile.mstr.old
- XXelse
- XX echo Extracting new file \'src/Makefile.mstr\'
- XXfi
-
- XXcat > src/Makefile.mstr << 'END_OF_FILE'
- XX#
- XX# Makefile for the ELM mail program.
- XX#
- XX# (C) Copyright 1986, Dave Taylor
- XX#
- XX# Last modification: March 7th, 1986
-
- XXSHELL=/bin/sh
-
- XX##############################
- XX#
- XX# if on a BSD system;
- XX# DEFINE=-DBSD
- XX# LIB2 = -lcurses
- XX# else if on a UTS system;
- XX# DEFINE=-DUTS
- XX# LIB2 = -la -lq
- XX# else if on a SUN system;
- XX# DEFINE=-DBSD -DSUN
- XX# LIB2 = -lcurses
- XX# else if on a Pyramid system;
- XX# DEFINE=-DBSD -DNO_VAR_ARGS
- XX# LIB2 = -lcurses
- XX# else
-
- XX DEFINE= >os-define<
- XX LIB2 = >lib2<
-
- XX# IF you're on an ACSnet system (Australia) then
- XX# you'll want to uncomment the following;
-
- XX# DEFINE= ${DEFINE} -DACSNET
-
- XX##############################
-
- XXCFILES= addr_utils.c alias.c aliasdb.c aliaslib.c args.c bounceback.c \
- XX calendar.c connect_to.c curses.c date.c delete.c domains.c edit.c \
- XX encode.c errno.c file.c file_utils.c fileio.c hdrconfg.c help.c \
- XX initialize.c input_utils.c leavembox.c mailmsg1.c mailmsg2.c \
- XX mailtime.c mkhdrs.c elm.c newmbox.c notesfile.c options.c opt_utils.c \
- XX output_utils.c pattern.c quit.c read_rc.c remail.c reply.c \
- XX return_addr.c savecopy.c screen.c showmsg.c signals.c softkeys.c \
- XX sort.c strings.c syscall.c utils.c validname.c getopt.c string2.c \
- XX builtin.c pmalloc.c
-
- XXHEADERS=../hdrs/curses.h ../hdrs/defs.h ../hdrs/headers.h ../hdrs/sysdefs.h
-
- XXOBJS= addr_utils.o alias.o aliasdb.o aliaslib.o args.o bounceback.o \
- XX calendar.o connect_to.o curses.o date.o delete.o domains.o edit.o \
- XX encode.o errno.o file.o file_utils.o fileio.o hdrconfg.o help.o \
- XX initialize.o input_utils.o leavembox.o mailmsg1.o mailmsg2.o \
- XX mailtime.o mkhdrs.o elm.o newmbox.o notesfile.o options.o opt_utils.o \
- XX output_utils.o pattern.o quit.o read_rc.o remail.o reply.o \
- XX return_addr.o savecopy.o screen.o showmsg.o signals.o softkeys.o \
- XX sort.o strings.o syscall.o utils.o validname.o getopt.o string2.o \
- XX builtin.o pmalloc.o
-
- XXBIN= ../bin
- XXLIBS= -ltermcap
- XXCFLAGS= -O -I../hdrs
- XXCC= >cc<
- XXRM= >rm<
-
- XX../bin/elm: ${OBJS} ${EXTRA} ${HEADERS} ../hdrs/elm.h
- XX ${CC} -o ${BIN}/elm -n ${OBJS} ${LIBS} ${LIB2}
-
- XX.c.o: ${HEADERS}
- XX ${CC} -c ${CFLAGS} ${DEFINE} $*.c
-
- XXcurses.o: curses.c ../hdrs/curses.h
- XX ${CC} -c ${CFLAGS} -DRAWMODE ${DEFINE} curses.c
-
- XX# curses.c : curses.q
- XX# @../bin/quickscreen curses.q
- XX#
- XX# curses.q :
- XX# @cp curses.c curses.q
-
- XXclean:
- XX ${RM} ${OBJS} LINT.OUT
-
- XXlint: LINT.OUT
-
- XXLINT.OUT: ${CFILES}
- XX lint -p -I../hdrs ${CFILES} > LINT.OUT
-
- XXlisting: LISTING
-
- XXLISTING: Makefile INDEX ${HEADERS} ${CFILES}
- XX @echo adding file 'Makefile'...
- XX @/bin/echo \\f > LISTING
- XX @cat Makefile >> LISTING
- XX @echo adding file 'INDEX'...
- XX @/bin/echo \\f >> LISTING
- XX @cat INDEX >> LISTING
- XX @../bin/makelisting ${HEADERS} ${CFILES}
- XX @echo LISTING generated.
-
- XXindex: INDEX
-
- XXINDEX: ${CFILES} ${HEADERS}
- XX @echo Creating function definition index
- XX @index *.c | sort > INDEX
- XX @echo File INDEX generated
- XXEND_OF_FILE
-
- XXchars=`cat src/Makefile.mstr | wc -c`
-
- XXif [ $chars -ne 2882 ]
- XXthen
- XX echo File damaged in transit...should be 2882 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#---------------------------------
- XX# File Elm/src/pmalloc.c is new!
-
- XXecho File Elm/src/pmalloc.c is new - extracting...
- XXif [ -f src/pmalloc.c ]
- XXthen
- XX echo File \'src/pmalloc.c\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'src/pmalloc.c.old\'...
- XX /bin/mv -f src/pmalloc.c src/pmalloc.c.old
- XXelse
- XX echo Extracting new file \'src/pmalloc.c\'
- XXfi
-
- XXcat > src/pmalloc.c << 'END_OF_FILE'
- XX/** pmalloc.c **/
-
- XX/** This routine contains a cheap permanent version of the malloc call to
- XX speed up the initial allocation of the weedout headers and the uuname
- XX data.
-
- XX This routine is originally from Jim Davis of HP Labs, with some
- XX mods by me.
- XX**/
-
- XX#include <stdio.h>
- XX#include "defs.h"
-
- XXchar *pmalloc(size)
- XXint size;
- XX{
- XX /** return the address of a specified block **/
-
- XX static char *our_block = NULL;
- XX static int free_mem = 0;
-
- XX char *return_value;
-
- XX /** if bigger than our threshold, just do the real thing! **/
-
- XX if (size > PMALLOC_THRESHOLD)
- XX return( (char *) malloc(size));
-
- XX /** if bigger than available space, get more, tossing what's left **/
-
- XX if (size > free_mem) {
- XX if ((our_block = (char *) malloc(PMALLOC_BUFFER_SIZE)) == NULL) {
- XX fprintf(stderr, "\n\r\n\rCouldn't pmalloc %d bytes!!\n\r\n\r",
- XX PMALLOC_BUFFER_SIZE);
- XX leave();
- XX }
- XX free_mem = PMALLOC_BUFFER_SIZE;
- XX }
- XX
- XX return_value = our_block; /* get the memory */
- XX our_block += size; /* use it up */
- XX free_mem -= size; /* and decrement */
-
- XX return( (char *) return_value);
- XX}
- XXEND_OF_FILE
-
- XXchars=`cat src/pmalloc.c | wc -c`
-
- XXif [ $chars -ne 1114 ]
- XXthen
- XX echo File damaged in transit...should be 1114 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#-------------------------------------
- XX# File 'hdrs/defs.h' diffs...
-
- XXcat << 'EOF' > hdrs/defs.h.D
- XX209a
-
- XX#ifdef SHORTNAMES /* map long names to shorter ones */
- XX# include <shortnames.h>
- XX#endif
- XX.
- XX144a
- XX/* some stuff for our own malloc call - pmalloc */
-
- XX#define PMALLOC_THRESHOLD 256 /* if greater, then just use malloc */
- XX#define PMALLOC_BUFFER_SIZE 2048 /* internal [memory] buffer size... */
-
- XX.
- XX12a
- XX#define KLICK 10
-
- XX.
- XX11c
- XX#define WHAT_STRING "@(#) Version 1.2a, patch #3 release - August, 1986"
- XX.
- XX9c
- XX#define VERSION "1.2a" /* Version number! WHAT_STRING should agree */
- XX.
- XXw
- XXEOF
-
- XXchars=`cat hdrs/defs.h | wc -c`
-
- XXif [ $chars -ne 6693 ]
- XXthen
- XX echo Your file hdrs/defs.h has been changed\!
- XX echo diffs saved as \"hdrs/defs.h.D\"
- XXelse
- XX echo applying diffs to file hdrs/defs.h...
- XX /bin/cat hdrs/defs.h.D | /bin/ed - hdrs/defs.h
- XXfi
-
- XX#-------------------------------------
- XX# File 'hdrs/headers.h' diffs...
-
- XXcat << 'EOF' > hdrs/headers.D
- XX102c
- XXextern int max_headers; /* number of headers currently allocated */
-
- XXextern struct header_rec *header_table;
- XX.
- XX93c
- XXextern long size_of_pathfd; /** size of pathfile, 0 if none **/
- XX.
- XXw
- XXEOF
-
- XXchars=`cat hdrs/headers.h | wc -c`
-
- XXif [ $chars -ne 5082 ]
- XXthen
- XX echo Your file hdrs/headers.h has been changed\!
- XX echo diffs saved as \"hdrs/headers.D\"
- XXelse
- XX echo applying diffs to file hdrs/headers.h...
- XX /bin/cat hdrs/headers.D | /bin/ed - hdrs/headers.h
- XXfi
-
- XX#-------------------------------------
- XX# File 'hdrs/elm.h' diffs...
-
- XXcat << 'EOF' > hdrs/elm.h.D
- XX107c
- XXint max_headers; /* number of headers allocated */
-
- XXstruct header_rec *header_table;
- XX.
- XX98c
- XXlong size_of_pathfd; /** size of pathfile, 0 if none **/
- XX.
- XX20a
- XX/******** and another string for the copyright notice ********/
-
- XXstatic char copyright[] = { "@(#) (C) Copyright 1986, Dave Taylor" };
-
- XX.
- XX17,18d
- XX15c
- XX/******** static character string containing the version number *******/
- XX.
- XX13d
- XXw
- XXEOF
-
- XXchars=`cat hdrs/elm.h | wc -c`
-
- XXif [ $chars -ne 4889 ]
- XXthen
- XX echo Your file hdrs/elm.h has been changed\!
- XX echo diffs saved as \"hdrs/elm.h.D\"
- XXelse
- XX echo applying diffs to file hdrs/elm.h...
- XX /bin/cat hdrs/elm.h.D | /bin/ed - hdrs/elm.h
- XXfi
-
- XX#---------------------------------
- XX# File Elm/hdrs/sysdefs.master is new!
-
- XXecho File Elm/hdrs/sysdefs.master is new - extracting...
- XXif [ -f hdrs/sysdefs.master ]
- XXthen
- XX echo File \'hdrs/sysdefs.master\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'hdrs/sysdefs.master.old\'...
- XX /bin/mv -f hdrs/sysdefs.master hdrs/sysdefs.master.old
- XXelse
- XX echo Extracting new file \'hdrs/sysdefs.master\'
- XXfi
-
- XXcat > hdrs/sysdefs.master << 'END_OF_FILE'
- XX/** sysdefs.h **/
-
- XX/** System level, configurable, defines for the ELM mail system. **/
-
- XX/** (C) Copyright 1986 Dave Taylor **/
-
- XX/** Define the following if you think that the information in messages
- XX that have "Reply-To:" and/or "From:" fields with addresses will
- XX contain valid addressing information. If this isn't defined, the
- XX calculated return address will ALWAYS be used instead. (note that
- XX this doesn't necessarily preclude the use of G)roup replies).
- XX**/
-
- XX#define USE_EMBEDDED_ADDRESSES
-
-
- XX#define FIND_DELTA 10 /* byte region where the binary search
- XX on the path alias file is fruitless
- XX (can't be within this boundary) */
-
- XX#define MAX_HEADERS >500< /* max number of messages in one file! */
- XX#define MAX_SALIASES >503< /* number of system aliases allowed */
- XX#define MAX_UALIASES >251< /* number of user aliases allowed */
- XX#define MAX_IN_WEEDLIST >150< /* max headers to weed out */
-
- XX#define MAX_HOPS 35 /* max hops in return addr to E)veryone */
-
- XX#define MAX_ATTEMPTS >6< /* #times to attempt lock file creation */
-
- XX/** see leavembox.c to determine if this should be defined or not....The
- XX default is to NOT have it defined.
- XX**/
-
- XX#define REMOVE_AT_LAST
-
- XX#define DEFAULT_BATCH_SUBJECT "no subject (file transmission)"
-
- XX/** If you want to have the mailer know about valid mailboxes on the
- XX host machine (assumes no delivery agent aliases) then you should
- XX undefine this (the default is to have it defined)...
- XX**/
-
- XX#define NOCHECK_VALIDNAME
-
- XX/** If your machine doesn't have virtual memory (specifically the vfork()
- XX command) then you should define the following....
- XX**/
-
- XX/** #define NO_VM **/
-
-
- XX/** If you want the mailer to check the pathalias database BEFORE it
- XX looks to see if a specified machine is in the L.sys database (in
- XX some cases routing is preferable to direct lines) then you should
- XX define the following...
- XX**/
-
- XX#define LOOK_CLOSE_AFTER_SEARCH
-
-
- XX/** If you'd rather the program automatically used the 'uuname' command
- XX to figure out what machines it talks to (instead of trying to get
- XX it from L.sys first) then define the following...
- XX**/
-
- XX#define USE_UUNAME
-
-
- XX/** If you'd like "newmail" to automatically go into background when you
- XX start it up (instead of the "newmail &" junk with the process id output,
- XX then define the following...
- XX**/
-
- XX#define AUTO_BACKGROUND
-
- XX/** If you'd rather your mail transport agent (ie sendmail) put the From:
- XX line into the message, define the following...
- XX**/
-
- XX#define DONT_ADD_FROM
-
- XX/** If your machine prefers the Internet notation of user@host for the
- XX From: line and addresses, define the following...(the default is to
- XX use this rather than the USENET notation - check your pathalias file!)
-
- XX**/
-
- XX#define INTERNET_ADDRESS_FORMAT
-
- XX/** If you're on a machine that prefers UUCP to Internet addresses, then
- XX define the following (the basic change is that on a machine that
- XX receives messages of the form <path>!user@<localhost> the displayed
- XX address will be <path>!user instead of user@<localhost>.
-
- XX BOGUS_INTERNET is the address that your local system appends to
- XX messages occasionally. The algorithm is simply to REMOVE the
- XX BOGUS_INTERNET string. This is horrible. *sigh*
-
- XX**/
-
- XX#define PREFER_UUCP
- XX#define BOGUS_INTERNET "@hplabs.HP.COM"
-
- XX/** If you're running ACSNET and/or want to have your domain name
- XX attached to your hostname on outbound mail then you can define
- XX the following (default are not defined)
- XX**/
-
- XX#define USE_DOMAIN
- XX#define DOMAIN "<enter your domain here>"
-
- XX/** If you are going to be running the mailer with setgid mail (or
- XX something similar) you'll need to define the following to ensure
- XX that the users mailbox in the spool directory has the correct
- XX group (NOT the users group)
- XX**/
-
- XX#define SAVE_GROUP_MAILBOX_ID
-
- XX/** If you want a neat feature that enables scanning of the message
- XX body for entries to add to the users ".calendar" (or whatever)
- XX file, define this.
- XX**/
-
- XX#define ENABLE_CALENDAR
- XX#define dflt_calendar_file "calendar" /* in HOME directory */
-
- XX/** If you want to implement 'site hiding' in the mail, then you'll need to
- XX uncomment the following lines and set them to reasonable values. See
- XX the configuration guide for more details....
- XX**/
-
- XX/****************************************************************************
-
- XX#undef DONT_ADD_FROM
-
- XX#define SITE_HIDING
- XX#define HIDDEN_SITE_NAME "fake-machine-name"
- XX#define HIDDEN_SITE_USERS "/usr/mail/lists/hidden_site_users"
-
- XX****************************************************************************/
-
- XX/** Do we have the 'gethostname()' call? If not, define the following **/
- XX/** #define NEED_GETHOSTNAME **/
-
- XX/** are you stuck on a machine that has short names? If so, define the
- XX following **/
-
- XX/** #define SHORTNAMES **/
-
- XX#define NOTES_HEADER "/***** "
- XX#define NOTES_FOOTER "/* ---------- */"
-
- XX#ifdef BSD
- XX# define system_hash_file "/usr/spool/mail/.alias_hash"
- XX# define system_data_file "/usr/spool/mail/.alias_data"
- XX#else
- XX# define system_hash_file "/usr/mail/.alias_hash"
- XX# define system_data_file "/usr/mail/.alias_data"
- XX#endif
-
- XX#define pathfile "/usr/lib/nmail.paths"
- XX#define domains "/usr/lib/domains"
-
- XX#define Lsys "/usr/lib/uucp/L.sys"
-
- XX/** where to put the output of the elm -d command... (in home dir) **/
- XX#define DEBUG "ELM:debug.info"
-
- XX#define temp_file "/tmp/snd."
- XX#define temp_mbox "/tmp/mbox."
- XX#define temp_print "/tmp/print."
- XX#define mailtime_file ".last_read_mail"
- XX#define readmsg_file ".readmsg"
- XX#define signature_file ".signature"
-
- XX#ifdef BSD
- XX# define default_editor "/usr/ucb/vi"
- XX# define mailhome "/usr/spool/mail/"
- XX#else
- XX# define default_editor "/usr/bin/vi"
- XX# define mailhome "/usr/mail/"
- XX#endif
-
- XX# define default_pager "builtin"
-
- XX#define sendmail "/usr/lib/sendmail"
- XX#define smflags "-oi"
- XX#define mailer "/bin/rmail"
- XX#ifdef BSD
- XX# define mailx "/usr/ucb/Mail"
- XX#else
- XX# define mailx "/usr/bin/mailx"
- XX#endif
-
- XX#define helphome "/usr/local/lib"
- XX#define helpfile "elm-help.main"
-
- XX#define elmrcfile "/.elmrc"
- XX#define mailheaders ".elmheaders"
- XX#define dead_letter "Cancelled.mail"
-
- XX#define unedited_mail "emergency.mbox"
-
- XX#define newalias "newalias -q 1>&2 > /dev/null"
- XX#define readmsg "readmsg"
-
- XX#define remove "/bin/rm -f" /* how to remove a file */
- XX#define cat "/bin/cat" /* how to display files */
- XX#define uuname "uuname" /* how to get a uuname */
- XXEND_OF_FILE
-
- XXchars=`cat hdrs/sysdefs.master | wc -c`
-
- XXif [ $chars -ne 6490 ]
- XXthen
- XX echo File damaged in transit...should be 6490 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#---------------------------------
- XX# File Elm/hdrs/shortnames.h is new!
-
- XXecho File Elm/hdrs/shortnames.h is new - extracting...
- XXif [ -f hdrs/shortnames.h ]
- XXthen
- XX echo File \'hdrs/shortnames.h\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'hdrs/shortnames.h.old\'...
- XX /bin/mv -f hdrs/shortnames.h hdrs/shortnames.h.old
- XXelse
- XX echo Extracting new file \'hdrs/shortnames.h\'
- XXfi
-
- XXcat > hdrs/shortnames.h << 'END_OF_FILE'
- XX/** shortnames.h **/
-
- XX/** This file is from Geoff Kuenning, and will help those poor users that
- XX are stuck using C compilers that don't have flexnames. Too bad.
-
- XX This file has no explicit copyright.
-
- XX**/
-
- XX#define PutLine0 PLine0
- XX#define PutLine1 PLine1
- XX#define PutLine2 PLine2
- XX#define PutLine3 PLine3
-
- XX#define add_to_table add_2_table
- XX#define address1 addrs1
- XX#define addressII addrsII
- XX#define addresses addr_s
- XX#define alternate_prompt alt_prompt
- XX#define alternative_addresses alt_addrs
- XX#define always_leave alw_leave
-
- XX#define calendar_line cal_line
- XX#define cancelled_msg cncld_msg
- XX#define central_message_buffer cntrl_bfr
- XX#define compare_dates cmp_dates
- XX#define compare_headers cmp_hdrs
- XX#define copy_message_across cpy_msg_across
- XX#define current_record cur_rec
- XX#define current_time cur_time
-
- XX#define define_softkeys def_softkeys
- XX#define display_central_message displ_cntrl_msg
- XX#define display_error displ_error
- XX#define display_headers displ_hdrs
- XX#define display_helpfile dspl_helpfile
- XX#define display_options displ_options
- XX#define display_title displ_titles
- XX#define display_to displ_to
-
- XX#define encrypted crypted
- XX#define encrypted_key crypt_key
- XX#define expanded_cc xp_cc
- XX#define expanded_to xp_to
- XX#define expand_address xp_addr
- XX#define expand_domain xp_domain
- XX#define expand_env xp_env
- XX#define expand_filename xp_filename
- XX#define expand_group xp_group
- XX#define expand_logname xp_logname
- XX#define expand_site xp_site
- XX#define expand_system xp_system
-
- XX#define filename2 fn2
- XX#define forward forwrd
-
- XX#define generate_reply_to gen_reply_to
- XX#define get_return_name g_ret_name
-
- XX#define header_line h_line
- XX#define header_page h_page
- XX#define headers_per_page h_per_page
- XX#define header_table h_table
-
- XX#define install_aliases ins_aliases
-
- XX#define last_line_loc last_ln_loc
-
- XX#define machine_group mach_group
- XX#define mailbox_defined mbox_defined
- XX#define mailfile_size mfile_size
- XX#define message_count msg_count
- XX#define message_number msg_number
-
- XX#define newaliases nwaliases
- XX#define noptimize_return noret_opt
- XX#define noptimize_usenet nousenet_opt
-
- XX#define optimize_and_add opt_and_add
- XX#define optimize_arpa opt_arpa
- XX#define optimize_cmplx_arpa opt_cmplx_arpa
- XX#define optimize_return opt_return
- XX#define optimize_usenet opt_usenet
- XX#define optional_arg opt_arg
- XX#define optionally_enter opt_enter
- XX#define original_cc orig_cc
- XX#define original_msg_num orig_msg_num
- XX#define original_to orig_to
-
- XX#define parse_arguments pars_arguments
- XX#define parse_arpa_from prs_arpa_from
- XX#define password_entry pw_entry
- XX#define pattern_enter pat_enter
- XX#define pattern_match pat_match
-
- XX#define read_alias_files rd_alias_files
- XX#define read_headers rd_headers
- XX#define read_notesfile rd_notesfile
- XX#define read_rc rd_rc
- XX#define read_rc_file rd_rc_file
- XX#define received_on_machine rcvd_on_machine
- XX#define remove_all rem_all
- XX#define remove_first_word rem_1st_word
- XX#define remove_domains rem_domains
- XX#define remove_header rem_hdr
- XX#define remove_user rem_user
- XX#define remove_through_ch rem_thru_ch
- XX#define reply_to_everyone repl_to_everyone
- XX#define resolve_received rslv_received
-
- XX#define show_message shw_message
- XX#define show_msg showmsg
- XX#define show_msg_tag sh_msg_tag
- XX#define size_of_pathfd sz_of_pathfd
- XX#define softkeys_off soft_off
- XX#define softkeys_on soft_on
- XX#define subjectbuffer subjbuff
- XX#define subject_matches subj_matches
- XX#define system_call sys_call
- XX#define system_data sys_data
- XX#define system_files sys_files
- XX#define system_hash_table sys_hash_table
- XX#define system_record sys_record
-
- XX#define tail_of_string tl_of_string
- XX#define talk_to_sys tlk_to_sys
- XX#define tempfile tmpfile
- XX#define termcap_label tcap_label
- XX#define top_of_screen_left top_left_of_screen
- XX#define top_of_screen_right top_right_of_screen
- XX#define translate_return xlate_return
-
- XX#define update_mailtime upd_mailtime
- XX#define update_title upd_title
- XX#define unexpanded_cc unexp_cc
- XX#define unexpanded_to unexp_to
-
- XX#define verify_transmission vfy_xmsn
-
- XX#define weeding_out wding_out
- XXEND_OF_FILE
-
- XXchars=`cat hdrs/shortnames.h | wc -c`
-
- XXif [ $chars -ne 4006 ]
- XXthen
- XX echo File damaged in transit...should be 4006 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/arepdaemon.c' diffs...
-
- XXcat << 'EOF' > utils/arepdaemon.D
- XX59,60d
- XX37c
-
- XX#ifdef BSD
- XX# include <sys/time.h>
- XX#else
- XX# include <time.h>
- XX#endif
-
- XX.
- XXw
- XXEOF
-
- XXchars=`cat utils/arepdaemon.c | wc -c`
-
- XXif [ $chars -ne 13380 ]
- XXthen
- XX echo Your file utils/arepdaemon.c has been changed\!
- XX echo diffs saved as \"utils/arepdaemon.D\"
- XXelse
- XX echo applying diffs to file utils/arepdaemon.c...
- XX /bin/cat utils/arepdaemon.D | /bin/ed - utils/arepdaemon.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/autoreply.c' diffs...
-
- XXcat << 'EOF' > utils/autoreply.D
- XX24,25d
- XXw
- XXEOF
-
- XXchars=`cat utils/autoreply.c | wc -c`
-
- XXif [ $chars -ne 4746 ]
- XXthen
- XX echo Your file utils/autoreply.c has been changed\!
- XX echo diffs saved as \"utils/autoreply.D\"
- XXelse
- XX echo applying diffs to file utils/autoreply.c...
- XX /bin/cat utils/autoreply.D | /bin/ed - utils/autoreply.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/fastmail.c' diffs...
-
- XXcat << 'EOF' > utils/fastmail.D
- XX218a
- XX# endif
- XX.
- XX217a
- XX# ifdef BSD4.1
- XX timezone(loc_time.time_zone, the_time->tz_isdst));
- XX# else
- XX.
- XX203a
- XX# endif
- XX.
- XX201a
- XX# ifdef BSD4.1
- XX junk = (long) time((long *) 0);
- XX ftime(&loc_time);
- XX# else
- XX.
- XX198a
- XX# endif
- XX.
- XX196a
- XX# ifdef BSD4.1
- XX struct timeb loc_time; /* of course this is different! */
- XX# else
- XX.
- XX32c
- XX# ifdef BSD4.1
- XX# include <time.h>
- XX# include <sys/types.h>
- XX# include <sys/timeb.h>
- XX# else
- XX# include <sys/time.h>
- XX# endif
- XX.
- XXw
- XXEOF
-
- XXchars=`cat utils/fastmail.c | wc -c`
-
- XXif [ $chars -ne 7799 ]
- XXthen
- XX echo Your file utils/fastmail.c has been changed\!
- XX echo diffs saved as \"utils/fastmail.D\"
- XXelse
- XX echo applying diffs to file utils/fastmail.c...
- XX /bin/cat utils/fastmail.D | /bin/ed - utils/fastmail.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/newmail.c' diffs...
-
- XXcat << 'EOF' > utils/newmail.D
- XX251c
- XX printf(">> %s mail from %s - %s\n\r",
- XX priority? "PRIORITY" : "New", from, subject);
- XX.
- XX218c
- XXshow_header(priority, from, subject)
- XXint priority;
- XX.
- XX136c
- XX show_header(priority, from_whom, subject);
- XX.
- XX131a
- XX else if (first_word(buffer,"Priority:"))
- XX priority++;
- XX.
- XX113c
- XX register int subj = 0, in_header = 1, count = 0, priority=0;
- XX.
- XX29a
- XX#ifdef AUTO_BACKGROUND
- XX#include <signal.h> /* background jobs ignore some signals... */
- XX#endif
-
- XX.
- XX20,23d
- XXw
- XXEOF
-
- XXchars=`cat utils/newmail.c | wc -c`
-
- XXif [ $chars -ne 7761 ]
- XXthen
- XX echo Your file utils/newmail.c has been changed\!
- XX echo diffs saved as \"utils/newmail.D\"
- XXelse
- XX echo applying diffs to file utils/newmail.c...
- XX /bin/cat utils/newmail.D | /bin/ed - utils/newmail.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/newalias.c' diffs...
-
- XXcat << 'EOF' > utils/newalias.D
- XX453a
- XX}
-
- XXextract_comment(comment, buffer, first, last)
- XXchar *comment, *buffer;
- XXint first, last;
- XX{
- XX /** Buffer contains a comment, located between the first and last
- XX values. Copy that into 'comment', but remove leading and
- XX trailing white space. Note also that it doesn't copy past
- XX a comma, so `unpublishable' comments can be of the form;
- XX dave: Dave Taylor, HP Labs : taylor@hplabs
- XX and the output will be "taylor@hplabs (Dave Taylor)".
- XX **/
-
- XX register int loc = 0;
-
- XX /** first off, skip the LEADING white space... **/
-
- XX while (buffer[first] == ' ') first++;
- XX
- XX /** now let's backup the 'last' value until we hit a non-space **/
-
- XX last -= 2; /* starts at ch AFTER colon.. */
- XX while (buffer[last] == ' ') last--;
-
- XX /** now a final check to make sure we're still talking about a
- XX reasonable string (rather than a "joe :: joe@dec" type string) **/
-
- XX if (first < last) {
- XX /* one more check - let's find the comma, if present... */
- XX for (loc=first; loc < last; loc++)
- XX if (buffer[loc] == ',') {
- XX last = loc-1;
- XX break;
- XX }
- XX loc = 0;
- XX while (first <= last)
- XX comment[loc++] = buffer[first++];
- XX comment[loc] = '\0';
- XX }
- XX.
- XX311a
- XX if (first_colon == -1 && string[i] == ':') {
- XX first_colon = i;
- XX for (last_colon=strlen(string);string[last_colon] != ':';
- XX last_colon--) ;
- XX }
- XX else if (i > first_colon && i < last_colon)
- XX if (string[i] == c1 || string[i] == c2)
- XX buffer[j++] = string[i];
- XX }
- XX
- XX.
- XX308c
- XX for (i = 0; string[i] != '\0' && i < LONG_STRING; i++) {
- XX.
- XX306c
- XX register int i = 0, j = 0, first_colon = -1, last_colon = -1;
- XX.
- XX304c
- XX /* Remove all occurances of character 'c1' or 'c2' from the string.
- XX Hacked (literally) to NOT remove ANY characters from within the
- XX colon fields. This will only be used if the line contains TWO
- XX colons (and comments with colons in them are the kiss of death!)
- XX */
-
- XX.
- XX284c
- XX if (strlen(comment) > 0) {
- XX fprintf(data, "%s (%s)\n", address, comment);
- XX additive = (long) (strlen(comment) + 4);
- XX }
- XX else
- XX fprintf(data, "%s\n", address, comment);
- XX.
- XX267,268c
- XX /** add address + comment to datafile, incrementing offset count
- XX (bytes), then for each alias in the aliases string, add to the
- XX.
- XX263c
- XXchar *aliases, *comment, *address;
- XX.
- XX261c
- XXadd_to_table(data, aliases, comment, address, table, size)
- XX.
- XX212c
- XX add_to_table(data, aliases, comment, address, table, size);
- XX.
- XX209a
- XX comment[0] = '\0'; /* default to nothing at all... */
-
- XX if ((first=strlen(aliases)+1) < (last=(strlen(buffer) - j))) {
- XX extract_comment(comment, buffer, first, last);
- XX }
-
- XX.
- XX198c
- XX char comment[LONG_STRING];
- XX int first, last, i = 0, j = 0;
- XX.
- XX193,195c
- XX /** break buffer down into three pieces: aliases, comment, and address.
- XX Make the appropriate entries in the table (size)
- XX **/
- XX.
- XXw
- XXEOF
-
- XXchars=`cat utils/newalias.c | wc -c`
-
- XXif [ $chars -ne 11051 ]
- XXthen
- XX echo Your file utils/newalias.c has been changed\!
- XX echo diffs saved as \"utils/newalias.D\"
- XXelse
- XX echo applying diffs to file utils/newalias.c...
- XX /bin/cat utils/newalias.D | /bin/ed - utils/newalias.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/printmail.c' diffs...
-
- XXcat << 'EOF' > utils/printmail.D
- XX72,73c
- XX argv++;
- XX if (argc-1) {
- XX.
- XX34c
- XX argv++;
- XX.
- XX28c
- XX argv++; /* get past argv[0] */
- XX.
- XXw
- XXEOF
-
- XXchars=`cat utils/printmail.c | wc -c`
-
- XXif [ $chars -ne 2472 ]
- XXthen
- XX echo Your file utils/printmail.c has been changed\!
- XX echo diffs saved as \"utils/printmail.D\"
- XXelse
- XX echo applying diffs to file utils/printmail.c...
- XX /bin/cat utils/printmail.D | /bin/ed - utils/printmail.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/readmsg.c' diffs...
-
- XXcat << 'EOF' > utils/readmsg.D
- XX317a
- XX if (strlen(to) > 0) { printf("%s", to); displayed_line++;}
- XX.
- XX304a
- XX to[0] = '\0';
- XX.
- XX301a
- XX else if (strncmp(buffer,"To: ", 3) == 0)
- XX strncpy(to, buffer, SLEN);
- XX.
- XX287c
- XXstatic char from[SLEN], subject[SLEN], date[SLEN], to[SLEN];
- XX.
- XX200c
- XX if (current == read_message[current_in_queue] || list_all_messages)
- XX.
- XX195,196c
- XX if ((current == read_message[current_in_queue] || list_all_messages)
- XX && page_breaks && current_in_queue > 0)
- XX.
- XX190,193c
- XX if (! list_all_messages) {
- XX if (current == read_message[current_in_queue])
- XX current_in_queue++;
- XX if (current_in_queue >= messages)
- XX exit(0);
- XX }
- XX.
- XX124c
- XX else if (*argv[0] == STAR) /* all messages.... */
- XX list_all_messages++;
- XX else { /* list of nums */
- XX.
- XX117c
- XX else if (! isdigit(*argv[0]) && *argv[0] != LAST_CHAR &&
- XX *argv[0] != STAR) {
- XX.
- XX67a
- XX list_all_messages = 0, /* just list 'em all?? */
- XX.
- XX42a
- XX#define STAR '*' /* char to delimit all messages... */
- XX.
- XX21a
- XX Also added '*' as a flag - indicating ALL messages in the mailbox.
-
- XX.
- XX18c
- XX
- XX.
- XXw
- XXEOF
-
- XXchars=`cat utils/readmsg.c | wc -c`
-
- XXif [ $chars -ne 9564 ]
- XXthen
- XX echo Your file utils/readmsg.c has been changed\!
- XX echo diffs saved as \"utils/readmsg.D\"
- XXelse
- XX echo applying diffs to file utils/readmsg.c...
- XX /bin/cat utils/readmsg.D | /bin/ed - utils/readmsg.c
- XXfi
-
- XX#-------------------------------------
- XX# File 'utils/wnewmail.c' diffs...
-
- XXcat << 'EOF' > utils/wnewmail.D
- XX249c
- XX /** Try to parse the 'From:' line given... It can be in one of
- XX.
- XX243c
- XX printf("%sMail from %s -- %s\n",
- XX priority? "PRIORITY ": "", from, subject);
- XX.
- XX208c
- XXshow_header(priority, from, subject)
- XXint priority;
- XX.
- XX126c
- XX show_header(priority, from_whom, subject);
- XX.
- XX123a
- XX else if (first_word(buffer, "Priority:"))
- XX priority++;
- XX.
- XX103c
- XX register int subj = 0, in_header = 1, count = 0, priority = 0;
- XX.
- XX17a
- XX#ifdef AUTO_BACKGROUND
- XX#include <signal.h> /* background jobs ignore some signals... */
- XX#endif
-
- XX.
- XX8,11d
- XXw
- XXEOF
-
- XXchars=`cat utils/wnewmail.c | wc -c`
-
- XXif [ $chars -ne 7804 ]
- XXthen
- XX echo Your file utils/wnewmail.c has been changed\!
- XX echo diffs saved as \"utils/wnewmail.D\"
- XXelse
- XX echo applying diffs to file utils/wnewmail.c...
- XX /bin/cat utils/wnewmail.D | /bin/ed - utils/wnewmail.c
- XXfi
-
- XX#---------------------------------
- XX# File Elm/utils/trim-headers is new!
-
- XXecho File Elm/utils/trim-headers is new - extracting...
- XXif [ -f utils/trim-headers ]
- XXthen
- XX echo File \'utils/trim-headers\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'utils/trim-headers.old\'...
- XX /bin/mv -f utils/trim-headers utils/trim-headers.old
- XXelse
- XX echo Extracting new file \'utils/trim-headers\'
- XXfi
-
- XXcat > utils/trim-headers << 'END_OF_FILE'
- XX: Use /bin/sh
-
- XX# This shell script is designed to be used either to trim the 'junk' headers
- XX# out of an archived/saved mailbox file or to trim the headers off a file
- XX# that is being piped to it. The program considers the following headers
- XX# to be worth saving - everything else is junked.
- XX#
- XX# From <user> <date>
- XX# From: name <address>
- XX# Subject:
- XX# To:
- XX# Cc:
- XX# Date:
- XX#
- XX# all others are ignored and trashed.
- XX#
- XX# (C) Copyright 1986, Dave Taylor
-
- XX# first off, let's make the 'awk' script we'll be using...
-
- XXcat << 'END_OF_AWK_SCRIPT' > /tmp/awk.$$
- XXBEGIN { in_body = 1 }
- XX{ if (in_body) {
- XX if ($1 == "From") in_body = 0;
- XX print $0
- XX }
- XX else if ($1 == "From:" || $1 == "Subject:" || $1 == "To:" || \
- XX $1 == "Cc:" || $1 == "Date:")
- XX print $0
- XX else if (length($0) == 0) {
- XX in_body = 1;
- XX print $0
- XX }
- XX}
- XXEND_OF_AWK_SCRIPT
-
- XX# next let's see if we're being piped to or if we've been handed
- XX# either a file name or list of file names...
-
- XXif [ "$1" = "" ]
- XXthen
- XX cat - | awk -f /tmp/awk.$$ | uniq
- XX rm -f /tmp/awk.$$
- XXelse
- XX for filename in $*
- XX do
- XX echo filtering file $filename
- XX cat $filename | awk -f /tmp/awk.$$ | uniq > OUTFILE
- XX mv OUTFILE $filename
- XX done
- XX echo done
- XXfi
- XX
- XXexit 0
- XXEND_OF_FILE
-
- XXchars=`cat utils/trim-headers | wc -c`
-
- XXif [ $chars -ne 1201 ]
- XXthen
- XX echo File damaged in transit...should be 1201 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#---------------------------------
- XX# File Elm/utils/Makefile.mstr is new!
-
- XXecho File Elm/utils/Makefile.mstr is new - extracting...
- XXif [ -f utils/Makefile.mstr ]
- XXthen
- XX echo File \'utils/Makefile.mstr\' is new, but you already have something called that\!
- XX echo I\'m going to move your file to \'utils/Makefile.mstr.old\'...
- XX /bin/mv -f utils/Makefile.mstr utils/Makefile.mstr.old
- XXelse
- XX echo Extracting new file \'utils/Makefile.mstr\'
- XXfi
-
- XXcat > utils/Makefile.mstr << 'END_OF_FILE'
- XX#
- XX# Makefile for the Elm system utilities
- XX#
- XX# (C) Copyright 1986, Dave Taylor
- XX#
- XX# Last modification: March 5th, 1986
-
- XXSHELL=/bin/sh
-
- XX##############################
- XX#
- XX# if on a BSD system;
- XX# DEFINE=-DBSD
- XX# LIB2 = -lcurses
- XX# else if on a UTS system;
- XX# DEFINE=-DUTS
- XX# LIB2 = -la
- XX# else if on a SUN system;
- XX# DEFINE=-DBSD -DSUN
- XX# LIB2 = -lcurses
- XX# else if on a Pyramid system;
- XX# DEFINE=-DBSD -DNO_VAR_ARGS
- XX# LIB2 = -lcurses
- XX# else
-
- XX DEFINE= >os-define<
- XX LIB2 = >lib2<
-
- XX##############################
-
- XXCFLAGS= -O -I../hdrs
- XXCC= >cc<
- XXRM= >rm<
- XXECHO= /bin/echo
-
- XXOBJS= ../bin/newalias ../bin/from ../bin/newmail ../bin/answer \
- XX ../bin/printmail ../bin/fastmail ../bin/readmsg \
- XX ../bin/checkalias ../bin/arepdaemon ../bin/autoreply ../bin/wnewmail \
- XX ../bin/messages ../bin/trim-headers
-
- XXall: ${OBJS}
-
- XX../bin/newalias: ../hdrs/defs.h newalias.c ../src/validname.o \
- XX ../src/opt_utils.o
- XX ${CC} ${CFLAGS} ${DEFINE} newalias.c ../src/validname.o \
- XX ../src/opt_utils.o -o ../bin/newalias
-
- XX../bin/from: from.c ../src/opt_utils.o ../src/string2.o
- XX ${CC} ${CFLAGS} ${DEFINE} from.c ../src/opt_utils.o \
- XX ../src/string2.o -o ../bin/from
-
- XX../bin/newmail: ../src/opt_utils.c newmail.c ../src/string2.o
- XX ${CC} ${CFLAGS} ${DEFINE} newmail.c \
- XX ../src/string2.o -o ../bin/newmail
-
- XX../bin/wnewmail: ../src/opt_utils.c wnewmail.c ../src/string2.o
- XX ${CC} ${CFLAGS} ${DEFINE} ../src/opt_utils.o \
- XX ../src/string2.o wnewmail.c -o ../bin/wnewmail
-
- XX../bin/answer: answer.c ../src/opt_utils.o
- XX ${CC} ${CFLAGS} ${DEFINE} answer.c ../src/opt_utils.o -o ../bin/answer
-
- XX../bin/printmail: printmail.c ../src/opt_utils.o
- XX ${CC} ${CFLAGS} ${DEFINE} printmail.c ../src/opt_utils.o \
- XX -o ../bin/printmail
-
- XX../bin/fastmail: fastmail.c
- XX ${CC} ${CFLAGS} ${DEFINE} fastmail.c ../src/opt_utils.o \
- XX -o ../bin/fastmail
-
- XX../bin/readmsg: readmsg.c ../src/getopt.o ../src/opt_utils.o
- XX ${CC} ${CFLAGS} ${DEFINE} readmsg.c ../src/getopt.o \
- XX ../src/opt_utils.o -o ../bin/readmsg
-
- XX../bin/arepdaemon: arepdaemon.c
- XX ${CC} ${CFLAGS} ${DEFINE} arepdaemon.c -o ../bin/arepdaemon
-
- XX../bin/autoreply: autoreply.c ../src/opt_utils.o
- XX ${CC} ${CFLAGS} ${DEFINE} autoreply.c ../src/opt_utils.o \
- XX -o ../bin/autoreply
-
- XX../bin/checkalias:
- XX @echo ': Use /bin/sh' > ../bin/checkalias
- XX @echo 'if [ "$$*" = "" ]; then' >> ../bin/checkalias
- XX @echo ' echo Usage: checkalias alias \[or aliases\]' >> \
- XX ../bin/checkalias
- XX @echo ' exit 1' >> ../bin/checkalias
- XX @echo 'fi' >> ../bin/checkalias
- XX @echo ' ' >> ../bin/checkalias
- XX @echo 'exec elm -c $$*' >> ../bin/checkalias
- XX @chmod +x ../bin/checkalias
-
- XX../bin/messages:
- XX @echo ': Use /bin/sh' > ../bin/messages
- XX @echo 'if [ "$$2" != "" ]; then' >> ../bin/messages
- XX @echo ' echo Usage: messages \{folder-name\}' >> ../bin/messages
- XX @echo ' exit 1' >> ../bin/messages
- XX @echo 'fi' >> ../bin/messages
- XX @echo ' ' >> ../bin/messages
- XX @echo 'if [ "$$1" = "" ]; then' >> ../bin/messages
- XX @echo ' fname=$$MAIL' >> ../bin/messages
- XX @echo ' optional="in your mailbox"' >> ../bin/messages
- XX @echo 'else' >> ../bin/messages
- XX @echo ' fname=$$1' >> ../bin/messages
- XX @echo ' optional="in folder $$1"' >> ../bin/messages
- XX @echo 'fi' >> ../bin/messages
- XX @echo ' ' >> ../bin/messages
- XX @echo 'mcount=`egrep "^From " $$fname | wc -l`' >> ../bin/messages
- XX @echo ' ' >> ../bin/messages
- XX @echo 'if [ $$mcount = 1 ];then' >> ../bin/messages
- XX @echo ' echo There is $$mcount message $$optional' >> ../bin/messages
- XX @echo 'else' >> ../bin/messages
- XX @echo ' echo There are $$mcount messages $$optional' >> ../bin/messages
- XX @echo 'fi' >> ../bin/messages
- XX @echo ' ' >> ../bin/messages
- XX @echo 'exit 0' >> ../bin/messages
- XX @chmod +x ../bin/messages
-
- XX../bin/trim-headers:
- XX @cp trim-headers ../bin/trim-headers
- XX @chmod +x ../bin/trim-headers
-
- XX../src/validname.o: ../src/validname.c ../hdrs/defs.h
- XX @(cd ../src; ${CC} -c ${CFLAGS} ${DEFINE} validname.c; cd ../utils)
-
- XX../src/opt_utils.o: ../src/opt_utils.c ../hdrs/defs.h
- XX @(cd ../src; ${CC} -c ${CFLAGS} ${DEFINE} opt_utils.c; cd ../utils)
-
- XX../src/getopt.o: ../src/getopt.c ../hdrs/defs.h
- XX @(cd ../src; ${CC} -c ${CFLAGS} ${DEFINE} getopt.c; cd ../utils)
-
- XX../src/string2.o: ../src/string2.c ../hdrs/defs.h
- XX @(cd ../src; ${CC} -c ${CFLAGS} ${DEFINE} string2.c; cd ../utils)
-
- XXclean:
- XX ${RM} *.o ${OBJS}
-
- XXlint:
- XX lint -p -I../hdrs *.c > LINT.OUT
- XXEND_OF_FILE
-
- XXchars=`cat utils/Makefile.mstr | wc -c`
-
- XXif [ $chars -ne 4391 ]
- XXthen
- XX echo File damaged in transit...should be 4391 bytes, is $chars instead
- XX echo I suggest you check it closely...
- XXfi
-
- XX#-------------------------------------
- XX# File 'bin/mail.elm' diffs...
-
- XXcat << 'EOF' > bin/mail.elm.D
- XX16c
- XX sleep 1800
- XX.
- XXw
- XXEOF
-
- XXchars=`cat bin/mail.elm | wc -c`
-
- XXif [ $chars -ne 363 ]
- XXthen
- XX echo Your file bin/mail.elm has been changed\!
- XX echo diffs saved as \"bin/mail.elm.D\"
- XXelse
- XX echo applying diffs to file bin/mail.elm...
- XX /bin/cat bin/mail.elm.D | /bin/ed - bin/mail.elm
- XXfi
-
- XX#-------------------------------------
- XX# File 'Instructions' diffs...
-
- XXcat << 'EOF' > Instructions.D
- XX84c
- XXshould say "no mail" if nothing's in your incoming mailbox, and
- XX.
- XX75c
- XXNote: the mailer runs as setgid mail to have the ability to WRITE
- XX.
- XX63,73c
- XX $ make -i install
- XX.
- XX59,61c
- XXnext, you can install all the software on your system by;
- XX.
- XX56,57c
- XX "answer", "arepdaemon", "autoreply", "fastmail", "from",
- XX "elm", "newalias", "newmail", "printmail", and "readmsg".
- XX.
- XX40,47d
- XX36,38c
- XX (if you're in "sh", you can use "> MAKELOG 2>&1" instead of ">& MAKELOG")
- XX.
- XX34c
- XX $ (make -i all >& MAKELOG) &
- XX $ tail -f MAKELOG
- XX.
- XX32c
- XX When that's done, or even if it fails (don't worry too much about it)
- XX.
- XX29,30c
- XX $ make documentation
- XX.
- XX27c
- XX $
- XX.
- XX25c
- XX Once you're happy with the localized files, you then need to create
- XXthe documentation (so there's a bit of a catch-22 that you need to format the
- XXConfiguration guide before you are happy with the localization but can't do
- XXthat until you're happy with the localization...oh well).
- XX.
- XX23c
- XX Answer the questions of that program,, then let it create the localized
- XXMakefiles and system definition files for you. When it's done you can double
- XXcheck the configuration (or customize it further) by reading the Configuration
- XXGuide + editing the file "hdrs/sysdefs.h". There are lots of neat features
- XXthat are unique to this mailer - it's worth a quick perusal at least!
- XX.
- XX19,21c
- XX $ sh Configure.sh
- XX.
- XX17c
- XX $ cd <where-ever you're keeping the Elm sources>
- XX.
- XX13,15c
- XX There is actually really one step needed - unpack all the shar
- XXfiles and then;
- XX.
- XX5c
- XX Last Update: July 17th, 1986
- XX.
- XXw
- XXEOF
-
- XXchars=`cat Instructions | wc -c`
-
- XXif [ $chars -ne 5058 ]
- XXthen
- XX echo Your file Instructions has been changed\!
- XX echo diffs saved as \"Instructions.D\"
- XXelse
- XX echo applying diffs to file Instructions...
- XX /bin/cat Instructions.D | /bin/ed - Instructions
- XXfi
- @//E*O*F Edit2//
- chmod u=rwx,g=rwx,o=rwx $OUT
-
- echo Inspecting for damage in transit...
- temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
- trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
- cat > $temp <<\!!!
- 1469 5048 37752 Edit2
- !!!
- wc Edit2 | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
- if test -s $dtemp ; then
- echo "Ouch [diff of wc output]:"
- cat $dtemp
- STATUS=1
- elif test $STATUS = 0 ; then
- echo "No problems found."
- else
- echo "WARNING -- PROBLEMS WERE FOUND..."
- fi
- exit $STATUS
-